<template>
  <div class="a">
    <ul>
      <li @click="select(0)" :class="i == 0 ? 'active' : ''">好物</li>
      <li @click="select(1)" :class="i == 1 ? 'active' : ''">笔记</li>
    </ul>
    <div class="content">
      <comp-pro-fabulous v-show="i == 0"></comp-pro-fabulous>
      <comp-note-fabulous v-show="i == 1"></comp-note-fabulous>
    </div>
  </div>
</template>
<script>
import compProFabulous from "@/components/comp-proFabulous.vue";
import compNoteFabulous from "@/components/comp-noteFabulous.vue";
export default {
  data() {
    return {
      i: 0,
    };
  },
  methods: {
    select(i) {
      this.i = i;
    },
  },
  components: {
    compProFabulous,
    compNoteFabulous,
  },
  mounted() {},
};
</script>
<style scoped lang="scss">
.a{
  margin-bottom: 30px;
  ul {
    width: 100%;
    height: 30px;
    // background: red;
    display: flex;
    justify-content: space-around;
    li {
      // width: 70px;
      font-size: 12px;
      line-height: 30px;
      text-align: center;
      border-bottom: 2px solid transparent;
    }
    .active {
      border-bottom: 2px solid red;
    }
  }
}
</style>